home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / std / c++ / 571 < prev    next >
Encoding:
Internet Message Format  |  1996-08-06  |  1.5 KB

  1. From: jamshid@io.com (Jamshid Afshar)
  2. Message-ID: <4gvte1$qvd@xanadu.io.com>
  3. X-Original-Date: 27 Feb 1996 15:34:57 -0600
  4. Path: in2.uu.net!bounce-back
  5. Date: 28 Feb 96 01:14:21 GMT
  6. Approved: fjh@cs.mu.oz.au
  7. Return-Path: <daemon@meeker.UCAR.EDU>
  8. Newsgroups: comp.std.c++
  9. Subject: Re: Q: default constructor for fundamental types?
  10. Organization: Illuminati Online, Austin, Texas, USA
  11. References: <4glrdc$dqo@ra.ibr.cs.tu-bs.de> <4gsvhn$csi@clarknet.clark.net> <9602271131.AA18225@lts.sel.alcatel.de>
  12. X-Auth: PGPMoose V1.1 PGP comp.std.c++
  13.     iQBFAgUBMTOsfeEDnX0m9pzZAQEKWgGAi6o1Q50PLxRQRlQCmhNnd8qXX4rS6fZx
  14.     B3u9mxkToNL9cwOYuVLOfUJjuxMwhmAF
  15.     =deNt
  16.  
  17. In article <9602271131.AA18225@lts.sel.alcatel.de>,
  18. James Kanze US/ESC 60/3/141 #40763  <kanze@lts.sel.alcatel.de> wrote:
  19. >Expressions of the form `int()' have always been allowed.  A (fairly)
  20. >recent change to the draft standard states that they have the same
  21. >value as default static initialization (in this case, 0).  The earlier
  22. >rules had the initailization undefined.
  23.  
  24. Is the following legal?
  25.  
  26.     class Foo {
  27.        int x;
  28.     public:
  29.        Foo()
  30.          : x()   // legal?
  31.        {}
  32.     };
  33.  
  34. and if so is it different than just:
  35.  
  36.     Foo::Foo() {}
  37.  
  38. --Jam
  39. ---
  40. [ To submit articles: try just posting with your news-reader.
  41.                       If that fails, use mailto:std-c++@ncar.ucar.edu
  42.   FAQ:      http://reality.sgi.com/employees/austern_mti/std-c++/faq.html
  43.   Policy:   http://reality.sgi.com/employees/austern_mti/std-c++/policy.html
  44.   Comments? mailto:std-c++-request@ncar.ucar.edu.
  45. ]
  46.